package com.projectfixit.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import javax.persistence.Id;
import javax.persistence.Transient;

import org.apache.commons.lang.StringUtils;

public class ContentDO implements Serializable {
	
	//Google AppEngine database doesn't allow to persist enums, so using static final list.
	public static final List<String> contentErrorType;
	
	static {
		contentErrorType = new ArrayList<String>();
		contentErrorType.add("IMG");
		contentErrorType.add("ANCHOR");
		contentErrorType.add("TEXT");
		contentErrorType.add("SPELL");
		contentErrorType.add("FACTUAL");
		contentErrorType.add("GRAMMATICAL");
		contentErrorType.add("OTHER");
		
	}
	
	@Id private String contentKey;
	private String content;
	private String title;
	private String author;
	
	@Transient private String errorContent;
	
	
	private List<String> errorContentList;
	private ContentDO(){
		
	}
	public ContentDO(String content, String title, String author, String id, 
			String errorContent, List<String> errorList){
		
		this.content = content;
		this.title = title;
		this.author = author;
		this.errorContent = errorContent;
		this.contentKey = id;
		this.errorContentList  = errorList;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}


	public String getErrorContent() {
		return errorContent;
	}

	public void setErrorContent(String errorContent) {
		this.errorContent = errorContent;
	}
	public List<String> getErrorContentList() {
		return errorContentList;
	}
	public void setErrorContentList(List<String> errorContentList) {
		this.errorContentList = errorContentList;
	}
	public String getContentKey() {
		return contentKey;
	}
	public void setContentKey(String key) {
		this.contentKey = key;
	}

}
